<template>
	<view class="content">
		<view :style="topBarStyle"></view>
		<image class="logo" src="/static//yanyan.jpg"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<!-- <view class="list"> -->
			<scroll-view class="list" v-if="pages && pages.length" scroll-y="true">
				<view class="item text-area" v-for="(item,index) in pages" v-show="index && item.path!='pages/index/webview'" @click="goto(item.path)">
					{{item.style.navigationBarTitleText}}
				</view>
			</scroll-view>
		<!-- </view> -->
	</view>
</template>

<script>
	import pageS from '@/pages.json'
	export default {
		data() {
			return {
				title: '妍妍在学习',
				pages:pageS.pages,
				topBarStyle:'height:'+window.topBarHeight+'px'
			}
		},
		onLoad() {
		// const pages = getCurrentPages()
		
		console.error(this.pages)
		},
		methods: {
			goto(path){
				console.error(path)
				this.$navigateTo('/'+path);
			}
		}
	}
</script>

<style>
	.logo{
		margin:10px auto;
		border-radius:50%;
	}
	.list{
		margin-top: 20rpx;
		border: 1px solid #8f8f94;
		border-radius: 10px;
		padding: 20px;
		height: 53vh;
		width: 60vw;
	}
	.item {
		font-size: 20px;
		/* color: #8f8f94; */
		line-height: 30px;
		/* border-bottom: 1px solid #8f8f94; */
		padding: 10px;
	}
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 300rpx;
		width: 300rpx;
		margin-top: 60rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 30rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
